<template>
  <!-- <n-button @click="test">test {{userInfo.STATUS}}</n-button> -->
  <template v-if="userInfo.STATUS == 0">
    <Loggin></Loggin>      
  </template>

  <template v-if="userInfo.STATUS  == 1 && userInfo.BSTYPE=='webserver'">
    <WorkWay></WorkWay>
  </template>

  <template v-if="userInfo.STATUS  == 1 && userInfo.BSTYPE=='client'">
    <act-step></act-step>
  </template>

  <template v-if="userInfo.STATUS  == 2">
    <Loggin :type="1"></Loggin>      
  </template>

  <template v-if="userInfo.STATUS  == 3">
    <Layout></Layout>
  </template>

  <template v-if="userInfo.STATUS == 4">
    <UpdateKey></UpdateKey>
  </template>
</template>

<script>
import Layout from "@/components/Layout.vue"
import Loggin from './views/Loggin.vue'
import { getCurrentInstance, ref } from 'vue'
export default {
  methods:{
    test(){
      if(this.userInfo.STATUS == 3) {
        this.userInfo.STATUS = 0
        return
      }
      this.userInfo.STATUS = this.userInfo.STATUS + 1
    }
  },
  name: "app",
  data(){
    return {
      
    }
  },
  components: {
    Layout,
    Loggin,
  },
  setup() {
    const { proxy: cthis } = getCurrentInstance();
    return {
      userInfo:ref(cthis.$userInfo)
    }
  }
};
</script>